#!/bin/bash
# history:
# - create_at: 2024-04-14
# - author: afei@magedu.com
# - description: use to issue a domain token

curl -i \
  -H "Content-Type: application/json" \
  -d '
{ "auth": {
    "identity": {
      "methods": ["password"],
      "password": {
        "user": {
          "name": "admin",
          "domain": { "id": "default" },
          "password": "CKD3VAQUSOFYMYVs"
        }
      }
    },
    "scope": {
      "domain": {
        "id": "default"
      }
    }
  }
}' \
  "http://gz-controller:5000/v3/auth/tokens" ; echo
